﻿using HandyControl.Controls;
using HandyControl.Data;
using HandyControl.Interactivity;
using System.Windows.Controls;

namespace FlyingEye.Views.UserControls
{
    /// <summary>
    /// DesktopNotificationUserControl.xaml 的交互逻辑
    /// </summary>
    public partial class DesktopNotificationUserControl : UserControl
    {
        public DesktopNotificationUserControl()
        {
            InitializeComponent();
        }

        public void Show(string message, bool staysOpen = false)
        {
            this.MessageTextBlock.Text = message;
            Notification.Show(this, ShowAnimation.Fade, staysOpen);
        }

        public void Close()
        {
            ControlCommands.CloseWindow.Execute(this);
        }
    }
}
